﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="GetKhoaHoc.ascx.cs" Inherits="NLLSite.UserControl.GetKhoaHoc" %>
<asp:ListView ID="ListView1" runat="server" DataSourceID="LinqDataSource1" 
    EnableModelValidation="True">
    
   
    
    <EmptyDataTemplate>
        
                    <span>Không có khóa học nào</span>
    </EmptyDataTemplate>
    
    
    
    <ItemTemplate>
     <div class="box-center-item-tin" >
                                	<a href="/khoa-hoc/<%# Eval("ID") %>/<%#ConvertToUnSign(DataBinder.Eval(Container.DataItem, "Name").ToString())%>" style="float: left; margin-right: 10px; margin-bottom: 10px;">
                                	<img height="100px" width="130px" style="border: 1px solid rgb(204, 204, 204); padding: 1px;" src="<%# Eval("ThumbImage") %>"  >
                                        	</a><a href="/khoa-hoc/<%# Eval("ID") %>/<%#ConvertToUnSign(DataBinder.Eval(Container.DataItem, "Name").ToString())%>"><b><%# Eval("Name")%></b></a>
                                            <p style="text-align: justify;"><%# Eval("Description") %></p>
	                                </div>
    <div class="clr"></div>
        <%--<span style="">ID:
        <asp:Label ID="IDLabel" runat="server" Text='<%# Eval("ID") %>' />
        <br />
        Name:
        <asp:Label ID="NameLabel" runat="server" Text='<%# Eval("Name") %>' />
        <br />
        Content:
        <asp:Label ID="ContentLabel" runat="server" Text='<%# Eval("Content") %>' />
        <br />
        Quantities:
        <asp:Label ID="QuantitiesLabel" runat="server" 
            Text='<%# Eval("Quantities") %>' />
        <br />
        StartDate:
        <asp:Label ID="StartDateLabel" runat="server" Text='<%# Eval("StartDate") %>' />
        <br />
        Schedule:
        <asp:Label ID="ScheduleLabel" runat="server" Text='<%# Eval("Schedule") %>' />
        <br />
        TimeSlot:
        <asp:Label ID="TimeSlotLabel" runat="server" Text='<%# Eval("TimeSlot") %>' />
        <br />
        <asp:CheckBox ID="StatusCheckBox" runat="server" 
            Checked='<%# Eval("Status") %>' Enabled="false" Text="Status" />
        <br />
        ThumbImage:
        <asp:Label ID="ThumbImageLabel" runat="server" 
            Text='<%# Eval("ThumbImage") %>' />
        <br />
        Description:
        <asp:Label ID="DescriptionLabel" runat="server" 
            Text='<%# Eval("Description") %>' />
        <br />
        <br />
        </span>--%>
    </ItemTemplate>
    <LayoutTemplate>
        <div ID="itemPlaceholderContainer" runat="server" style="">
            <span runat="server" id="itemPlaceholder" />
        </div>
        <div style="">
            <asp:DataPager ID="DataPager1" runat="server">
                <Fields>
                     
                    <asp:NextPreviousPagerField ButtonType="Image" ShowFirstPageButton="True" 
                        ShowNextPageButton="False" ShowPreviousPageButton="False" FirstPageText="Trang đầu" LastPageText="Trang cuối" NextPageText="Sau" PreviousPageText="Trước" FirstPageImageUrl="../Templates/Images/start.gif" LastPageImageUrl="../Templates/Images/end.gif" NextPageImageUrl="../Templates/Images/next.gif" PreviousPageImageUrl="../Templates/Images/previous.gif" />
                    <asp:NumericPagerField />
                    <asp:NextPreviousPagerField ButtonType="Image" ShowLastPageButton="True" 
                        ShowNextPageButton="False" ShowPreviousPageButton="False" FirstPageText="Trang đầu" LastPageText="Trang cuỗi" NextPageText="Sau" PreviousPageText="Trước" FirstPageImageUrl="../Templates/Images/start.gif" LastPageImageUrl="../Templates/Images/end.gif" NextPageImageUrl="../Templates/Images/next.gif" PreviousPageImageUrl="../Templates/Images/previous.gif" />
                
                </Fields>
            </asp:DataPager>
        </div>
    </LayoutTemplate>
   
   
   
</asp:ListView>
<asp:LinqDataSource ID="LinqDataSource1" runat="server" 
    ContextTypeName="DAL_Class.NLLDataContext" 
    Select="new (ID, Name, Content, Quantities, StartDate, Schedule, TimeSlot, Status, ThumbImage, Description)" 
    TableName="Courses">
</asp:LinqDataSource>